package cn.itsource.basic.util;

import cn.itsource.user.interceptor.LoginInterceptor;
import org.omg.PortableInterceptor.Interceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebitsourceInterceptor implements WebMvcConfigurer {
    @Autowired
    private LoginInterceptor interceptor;

    public void addinterceptr(InterceptorRegistry registry){
        registry.addInterceptor(interceptor)
                .addPathPatterns("/user/login")
                .excludePathPatterns("/shop/settlement")
                .excludePathPatterns("/fastdfs/**")
                .excludePathPatterns("/wechat/**")
                //.excludePathPatterns("/verification/**")
                .excludePathPatterns("/user/**");


    }


}
